package org.zhixiang.gisQuery.query;

/**
 * 
 * @say little Boy, don't be sad.
 * @name Rezar
 * @time 2018年5月15日 下午5:38:41
 * @Desc 些年若许,不负芳华.
 *
 */
public class SelfPoint {

	/**
	 * x坐标
	 */
	public double x;

	/**
	 * y坐标
	 */
	public double y;

	/**
	 * 边界查找算法中 是否被找到
	 */
	public boolean founded = false;

	public SelfPoint() {
	}

	public SelfPoint(double x, double y) {
		this.x = x;
		this.y = y;
	}

	public double getX() {
		return x;
	}

	public void setX(double x) {
		this.x = x;
	}

	public double getY() {
		return y;
	}

	public void setY(double y) {
		this.y = y;
	}

	@Override
	public String toString() {
		return "(" + x + ", " + y + ")";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		long temp;
		temp = Double.doubleToLongBits(x);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		temp = Double.doubleToLongBits(y);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		SelfPoint other = (SelfPoint) obj;
		if (Double.doubleToLongBits(x) != Double.doubleToLongBits(other.x))
			return false;
		if (Double.doubleToLongBits(y) != Double.doubleToLongBits(other.y))
			return false;
		return true;
	}

}
